package br.edu.univas.jobmanager.view;

import java.awt.BorderLayout;

import javax.swing.JFrame;

import br.edu.univas.jobmanager.controller.ControllerPrincipal;
import br.edu.univas.jobmanager.controller.ControllerRelatorioTarefas;

public class FrameHistoricoTarefas extends JFrame{
	private static final long serialVersionUID = 5383692096853098473L;

	
	
	private PanelFiltrosTarefa panelFiltros;
	private PanelHistoricoTarefas panelHistorico;
	
	private ControllerRelatorioTarefas _controller;
	public FrameHistoricoTarefas(ControllerPrincipal controllerPrincipal) {
		setTitle("Historico de tarefas");
		
		_controller = new ControllerRelatorioTarefas(controllerPrincipal);
		initialize();
		pack();
		setLocationRelativeTo(null);
	}
	private void initialize() {
		add(getPanelFiltros(),BorderLayout.NORTH);
		add(getPanelHistorico(),BorderLayout.CENTER);
		
	}
	private PanelFiltrosTarefa getPanelFiltros() {
		if(panelFiltros == null){
			panelFiltros = new PanelFiltrosTarefa(_controller);
		}
		return panelFiltros;
	}
	private PanelHistoricoTarefas getPanelHistorico() {
		if(panelHistorico == null){
			panelHistorico = new PanelHistoricoTarefas(_controller);
		}
		return panelHistorico;
	}
	
	
}
